-
Notifications
You must be signed in to change notification settings - Fork 9
SK-2504: Add support for custom tokenUri #228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SK-2504: Add support for custom tokenUri #228
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for custom token URIs to enable Bring Your Own Cloud (BYOC) integrations. The SDK now accepts an optional token_uri parameter in credentials, allowing users to specify custom authentication endpoints while maintaining backward compatibility with existing implementations.
Changes:
- Added validation for custom
token_uriin credentials using a newis_valid_urlhelper - Updated token generation functions to support
token_urioverride via options - Enhanced error handling with specific messages for token URI validation and bearer token retrieval failures
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| skyflow/utils/_helpers.py | Added is_valid_url helper function to validate URLs |
| skyflow/utils/init.py | Exported is_valid_url helper function |
| skyflow/utils/_skyflow_messages.py | Added error messages for invalid token URI and bearer token failures |
| skyflow/utils/validations/_validations.py | Added token URI validation in credentials and removed unnecessary validations |
| skyflow/vault/client/client.py | Added token URI pass-through and fixed exception type |
| skyflow/service_account/_utils.py | Added token URI validation and override support, improved error handling |
| tests/utils/test__helpers.py | Added tests for is_valid_url function |
| tests/utils/validations/test__validations.py | Added tests for token URI validation and removed obsolete test |
| tests/vault/client/test__client.py | Added tests for bearer token generation with custom token URI |
| tests/utils/test__utils.py | Added comprehensive tests for token generation with custom token URI |
| tests/service_account/test__utils.py | Added tests for service account token generation error scenarios |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Why
Outcome